package com.ruoyi.api.feign;

import com.aliyun.green20220302.Client;
import com.aliyun.green20220302.models.DescribeImageModerationResultResponseBody;
import com.aliyun.green20220302.models.VideoModerationResultResponseBody;

/**
 * 内容审核服务
 */
public interface ContentModerationService {

    /**
     * 创建深圳请求客户端
     */
    Client createSZClient() throws Exception;

    /**
     * 创建上海请求客户端
     */
    Client createSHClient() throws Exception;

    /**
     * 文本内容审核
     */
    boolean textModeration(String text, Client client);

    /**
     * 提交图片内容检测（同步）
     */
    boolean imageUrlModeration(String imageUrl, Client client);

    /**
     * 提交图片内容检测（同步 适用于单图调用）
     */
    boolean imageModeration(String ossObjectName, Client client);

    /**
     * 提交图片内容检测（异步）
     */
    String imageUrlAsyncModeration(String imageUrl, Client client) throws Exception;

    /**
     * 提交图片内容检测（异步）
     */
    String imageAsyncModeration(String ossObjectName, Client client) throws Exception;

    /**
     * 获取图片内容检测结果
     */
    DescribeImageModerationResultResponseBody.DescribeImageModerationResultResponseBodyData getImageResult(String reqId, Client client) throws Exception;

    /**
     * 提交视频内容检测任务
     */
    String videoUrlModeration(String videoUrl, Client client) throws Exception;

    /**
     * 提交视频内容检测任务
     */
    String videoModeration(String ossObjectName, Client client) throws Exception;

    /**
     * 获取视频检测任务结果
     */
    VideoModerationResultResponseBody.VideoModerationResultResponseBodyData getVideoResult(String taskId, Client client) throws Exception;

}
